IndicesOf Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Enumerates the indices of all the items in a list equal to a given item.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static IEnumerable<int> IndicesOf<T>(
	IList<T> list,
	T item
)
Visual Basic (Declaration)
Public Shared Function IndicesOf(Of T) ( _
	list As IList(Of T), _
	item As T _
) As IEnumerable(Of Integer)
Visual C++
public:
generic<typename T>
static IEnumerable<int>^ IndicesOf (
	IList<T>^ list, 
	T item
)

Parameters

list
IList<(Of <T>)>
The list to search.
item
T
The item to search for.

Return Value

An IEnumerable<T> that enumerates the indices of items equal to item.

Type Parameters

T

Remarks

The default sense of equality for T is used, as defined by T's implementation of IComparable<T>.Equals or object.Equals.

See Also